/*
 * @Author: 吴世扬 18368095041@163.com
 * @Date: 2024-05-08 16:02:10
 * @LastEditors: 吴世扬 18368095041@163.com
 * @LastEditTime: 2024-10-24 10:24:34
 * @FilePath: /data-center-web-update/src/router/system.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Icon, {
    UserOutlined,
    IdcardOutlined,
    MenuOutlined
} from '@ant-design/icons';
import { Icon as Iconify } from '@iconify/react';

import Layout from '@/layout/Layout';
import MySuspense from './MySuspense';

export const systemRoutes: AppRouteRecordRaw[] = [
    {
        path: '/system',
        name: 'System',
        element: <Layout />,
        meta: {
            title: '配置',
            icon: (
                <Icon
                    component={() => (
                        <Iconify icon="carbon:document-configuration" />
                    )}
                />
            )
        },
        children: [
            {
                path: '/system/usersManage',
                name: 'UsersManage',
                element: (
                    <MySuspense
                        lazy={() =>
                            import('@/views/system/UsersManage/UsersManage')
                        }
                    />
                ),
                meta: {
                    title: '用户管理',
                    icon: <UserOutlined />,
                    keepAlive: true
                }
            },
            {
                path: '/system/rolesManage',
                name: 'RolesManage',
                element: (
                    <MySuspense
                        lazy={() =>
                            import('@/views/system/RolesManage/RolesManage')
                        }
                    />
                ),
                meta: {
                    title: '角色管理',
                    icon: <IdcardOutlined />,
                    keepAlive: true
                }
            },
            {
                path: '/system/menusManage',
                name: 'MenusManage',
                element: (
                    <MySuspense
                        lazy={() =>
                            import('@/views/system/MenusManage/MenusManage')
                        }
                    />
                ),
                meta: {
                    title: '菜单管理',
                    icon: <MenuOutlined />,
                    keepAlive: true
                }
            },
            {
                path: '/system/deptManage',
                name: 'DeptManage',
                element: (
                    <MySuspense
                        lazy={() =>
                            import('@/views/system/DeptManage/DeptManage')
                        }
                    />
                ),
                meta: {
                    title: '科室',
                    icon: (
                        <Icon
                            component={() => (
                                <Iconify icon="icomoon-free:tree" />
                            )}
                        />
                    ),
                    keepAlive: true
                }
            }
        ]
    }
];
